<?php

class Sizitisi {
	public $id;
	public $partida;
	public $pektis;
	public $moment;
	public $kimeno;

	public function __construct($row = NULL) {
		$this->id = NULL;
		$this->partida = NULL;
		$this->pektis = NULL;
		$this->moment = NULL;
		$this->kimeno = NULL;

		if (isset($row)) {
			if (is_array($row)) {
				$this->id = $row['id'];
				$this->partida = $row['partida'];
				$this->pektis = $row['pektis'];
				$this->moment = $row['moment'];
				$this->kimeno = $row['kimeno'];
			}
			else {
				$row = explode("\t", $row);
				if (count($row) != 5) {
					return;
				}

				$nf = 0;
				$this->id = $row[$nf++];
				$this->partida = $row[$nf++];
				$this->pektis = $row[$nf++];
				$this->moment = $row[$nf++];
				$this->kimeno = $row[$nf++];
			}
					
		}
	}

	public function arxio($fp) {
		Globals::put_line($fp, $this->id . "\t" . $this->partida . "\t" .
			$this->pektis . "\t" . $this->moment . "\t" . $this->kimeno);
	}
}

?>
